package com.aiguigu.cloud.apis;

import com.aiguigu.cloud.entities.PayDTO;
import com.aiguigu.cloud.resp.ResultData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/*
* cloud-payment-service服务对外暴露的接口
* */

@FeignClient(value = "cloud-payment-service")
public interface PayFeignApi {

    @PostMapping(value = "/pay/add")
    public ResultData<String> addPay(@RequestBody PayDTO payDTO);

    @DeleteMapping(value = "/pay/delete/{id}")
    public ResultData<Integer> deletePay(@PathVariable("id") Integer id);

    @PutMapping(value = "/pay/update")
    public ResultData<String> updatePay(@RequestBody PayDTO payDTO);

    @GetMapping(value = "/pay/get/{id}")
    public ResultData getById(@PathVariable("id") Integer id);


    @GetMapping(value = "/pay/get/info")
    public String myLoadBalancer();


    @GetMapping(value = "/pay/circuit/{id}")
    public String myCircuit(@PathVariable Integer id);
}
